Skip to content

Conversation

albertyw
Copy link
Owner

For #1

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements MVT (Mapbox Vector Tiles) encoding for timezone data, transitioning from GeoJSON to a more efficient binary format. This change affects both data generation and consumption within the timezone library.

  • Replaces GeoJSON marshaling/unmarshaling with MVT encoding/decoding
  • Removes mock timezone functionality and associated test cases
  • Updates dependencies to include MVT-related packages

Reviewed Changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.

File Description
tzshapefilegen/main.go Updates data generation to use MVT encoding instead of GeoJSON
localtimezone.go Modifies data loading to decode MVT format instead of GeoJSON
localtimezone_test.go Removes mock timezone tests that are no longer compatible
go.mod Adds required dependencies for MVT support (protobuf and protoscan)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

z.tzData = make(map[string]tzData)
z.tzids = []string{}
z.mu.Unlock()
return errors.New("asdf")
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message 'asdf' is not descriptive. It should clearly indicate what went wrong, such as 'data layer not found in MVT' or 'missing required data layer'.

Suggested change
return errors.New("asdf")
return errors.New("data layer not found in MVT")

Copilot uses AI. Check for mistakes.

"data": fc,
}
layers := mvt.NewLayers(data)
// layers.Simplify(simplify.VisvalingamThreshold(0.0001))
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commented-out simplification code should either be removed if not needed or implemented if required for the MVT encoding functionality.

Suggested change
// layers.Simplify(simplify.VisvalingamThreshold(0.0001))
layers.Simplify(simplify.VisvalingamThreshold(0.0001))

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant